package com.farm.equipment.states;

import com.farm.equipment.Equipment;
import com.farm.equipment.EquipmentState;

public class WorkingState implements EquipmentState {
    @Override
    public void start(Equipment equipment) {
        System.out.println("设备已经在工作状态");
    }

    @Override
    public void stop(Equipment equipment) {
        System.out.println("设备从工作状态停止");
        equipment.setState(new IdleState());
    }

    @Override
    public void work(Equipment equipment) {
        System.out.println("设备正在工作中");
    }

    @Override
    public void maintain(Equipment equipment) {
        System.out.println("设备需要先停止才能进入维护状态");
    }
}